<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
  <feeds>
    <xsl:for-each select="/feeds/feed">
      <xsl:sort select="@updated" data-type="text" order="descending"/>
      <feed name="{@name}" updated="{@updated}" siteurl="{@siteurl}" feedurl="{@feedurl}" li_title="{@li_title}"><xsl:for-each select="tag"><tag value="{@value}" /></xsl:for-each></feed>
    </xsl:for-each>
  </feeds>
</xsl:template>

</xsl:stylesheet> 

